package org.fly.jingwei.service;

import org.fly.jingwei.bean.PageForBean;
import org.fly.jingwei.entity.SlaveEntity;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author leo
 * @date 2017/2/28
 */
public interface SlaveService {
    Integer getAllSlaveSize();

    List<SlaveEntity> getAllSlave(String userGroupName)  throws Exception;

    SlaveEntity getSlaveByLoadAvg(List<SlaveEntity> slaves);

    PageForBean<SlaveEntity> findSlaveByPageInfo(Integer start, Integer limit, String userGroupName) throws Exception;

    void deleteSlave(Integer slaveId);

    String slaveTest(String hostName)  throws Exception ;

    String allSlaveQuato(String userGroupName) throws Exception;

    String slaveQuatoByCondition(String quatoType, String viewType, String maxOrAvg, String chooseDate, String userGroupName) throws Exception;

    String slaveQuatoLineChart(String quatoType, String maxOrAvg, String chooseDate, String userGroupName) throws Exception;

    String slaveQuatoColumnDiagram(String quatoType, String maxOrAvg, String chooseDate, String userGroupName);

    String slaveQuatoHTMLText(String quatoType, String maxOrAvg, String chooseDate, String userGroupName);

    String addSlave(HttpServletRequest request);

    SlaveEntity getSlaveByHostName(Integer id);

    String updateSlave(HttpServletRequest request);
}
